package com.xiaoma.observer;

import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @description  
 * @author wangtianxiang
 * @date: 2021/11/24 10:57
 */
@Component
public class SendChannels {
    private final List<SendChannel> sendChannels;

    public SendChannels(List<SendChannel> sendChannels) {
        this.sendChannels = sendChannels;
    }


    public void send(String content){
        for (SendChannel sendChannel : sendChannels) {
            sendChannel.send(content);
        }
    }


}
